package org.cying.main.feign;

import org.cying.main.domain.Department;
import org.cying.main.domain.SampleResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Task Server 远程调用 Department 接口
 * @author Cying
 */
@Component
@FeignClient(value = "Department-Server")
public interface TaskFeignDept {

    @GetMapping(value = "/dept/get/department")
    SampleResult<List<Department>> getDepartment(
            @RequestParam(value = "tid", required = false) String tid
    );

}
